﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ClientMgr.aspx.cs" Inherits="web.ClientMgr.Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<%@ Register assembly="PmsClient" namespace="PmsClient" tagprefix="UserControl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    
      function pageLoad() {
      }
    
    </script>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style3
        {
            width: 100px;
        }
        </style>
    </head>
<body>
    <form id="form1" runat="server">

    <div style="border: 1px dotted #C0C0C0; position: absolute; top: 30px; left: 0px; width: 200px;" 
        id="div_ClientList">

    <asp:UpdatePanel ID="UpdatePanel_ClientTree" runat="server" 
            UpdateMode="Conditional">
    <ContentTemplate>    
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
            EnableScriptGlobalization="True">
        </asp:ToolkitScriptManager>
        客户类型：<br />
        <asp:DropDownList ID="DropDownList_ClientTree" runat="server" AutoPostBack="True" 
            DataSourceID="SqlDataSource_ClientTree" DataTextField="TreeName" DataValueField="TreeID" 
            Height="39px" Width="196px" 
            onselectedindexchanged="DropDownList_ClientTree_SelectedIndexChanged">
        </asp:DropDownList>
        <asp:SqlDataSource ID="SqlDataSource_ClientTree" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" 
            
            SelectCommand="SELECT [TreeID], [TreeSJID], [TreeNO], [TreeName] FROM [ClientOfClientTree] WHERE ([TreeSJID] = @TreeSJID)">
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="TreeSJID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
   </ContentTemplate>
    </asp:UpdatePanel>

    <asp:UpdatePanel ID="UpdatePanel_ClientList" runat="server" 
            UpdateMode="Conditional">
    <ContentTemplate>    

        <asp:GridView ID="GridView_ClientList" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource_ClientList" Width="200px" AllowSorting="True" 
            CellPadding="3" GridLines="Horizontal" 
            DataKeyNames="ClientID" Font-Size="Small" ShowFooter="True" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" BackColor="White" 
            BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px">
            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
            <Columns>
                <asp:CommandField ShowSelectButton="True" >
                <ControlStyle Width="35px" />
                <FooterStyle Width="35px" />
                <HeaderStyle Width="35px" />
                <ItemStyle Width="35px" />
                </asp:CommandField>
                <asp:BoundField DataField="ClientName" HeaderText="客户名称" 
                    SortExpression="ClientName" />
                <asp:BoundField DataField="ClientNO" HeaderText="编码" 
                    SortExpression="ClientNO" >
                <ControlStyle Width="35px" />
                <FooterStyle Width="35px" />
                <HeaderStyle Width="35px" />
                <ItemStyle Width="35px" />
                </asp:BoundField>
                <asp:BoundField DataField="ClientID" HeaderText="ClientID" ReadOnly="True" 
                    SortExpression="ClientID" Visible="False" />
            </Columns>
            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
            <AlternatingRowStyle BackColor="#F7F7F7" />
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource_ClientList" runat="server" 
            ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" 
            SelectCommand="SELECT [ClientName], [ClientNO], [ClientID] FROM [ClientOfClient] WHERE ([TreeID] = @TreeID)" 
            ProviderName="<%$ ConnectionStrings:pmsConnectionString.ProviderName %>">
            <SelectParameters>
                <asp:ControlParameter ControlID="DropDownList_ClientTree" Name="TreeID" 
                    PropertyName="SelectedValue" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
   </ContentTemplate>
    </asp:UpdatePanel>

    </div>

       <asp:UpdatePanel ID="UpdatePanel_ClientInfo" runat="server" 
            UpdateMode="Conditional">
    <ContentTemplate>   
    <div style="border: 1px dotted #C0C0C0; position: absolute; top: 30px; width: 600px; left: 200px; height: 282px; " 
            id="div_ClientInfo">
        <table class="style1" lang="zh-cn">
            <tr>
                <td class="style3">
                    客户名称*</td>
                <td>
                    <asp:TextBox ID="txtClientName" runat="server" CssClass="txtbox" Width="128px"></asp:TextBox>
                </td>
                <td>
                    性别</td>
                <td>
                    <asp:DropDownList ID="txtPersonSex" runat="server" Height="16px" Width="135px">
                        <asp:ListItem>男</asp:ListItem>
                        <asp:ListItem>女</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    出身日期</td>
                <td>
                    <asp:TextBox ID="txtPersonBirthday" runat="server" CssClass="txtbox" 
                        Width="128px"></asp:TextBox>
                    <asp:CalendarExtender ID="txtPersonBirthday_CalendarExtender" runat="server" 
                        Enabled="False" Format="yyyy-MM-dd" PopupButtonID="txtPersonBirthday" 
                        TargetControlID="txtPersonBirthday" TodaysDateFormat="yyyy-MM-dd" 
                        CssClass="cal_Theme1" DaysModeTitleFormat="yyyy,MMMM">
                    </asp:CalendarExtender>
                </td>
                <td>
                    民族</td>
                <td>
                    <asp:TextBox ID="txtPersonNation" runat="server" CssClass="txtbox" 
                        Width="128px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    文化程度</td>
                <td>
                    <asp:DropDownList ID="txtPersonEduDegree" runat="server" Height="16px" 
                        Width="135px">
                        <asp:ListItem Value="未知"></asp:ListItem>
                        <asp:ListItem>小学</asp:ListItem>
                        <asp:ListItem>初中</asp:ListItem>
                        <asp:ListItem>高中</asp:ListItem>
                        <asp:ListItem>大专</asp:ListItem>
                        <asp:ListItem>本科</asp:ListItem>
                        <asp:ListItem>硕士</asp:ListItem>
                        <asp:ListItem>博士</asp:ListItem>
                        <asp:ListItem>其他</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    婚姻状况</td>
                <td>
                    <asp:DropDownList ID="txtPersonMerriageState" runat="server" Height="16px" 
                        Width="135px">
                        <asp:ListItem>未知</asp:ListItem>
                        <asp:ListItem>未婚</asp:ListItem>
                        <asp:ListItem>已婚</asp:ListItem>
                        <asp:ListItem>离异</asp:ListItem>
                        <asp:ListItem>丧偶</asp:ListItem>
                        <asp:ListItem>其他</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    身份证号码</td>
                <td>
                    <asp:TextBox ID="txtPersonIDCardNO" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
                <td>
                    证件有效期</td>
                <td>
                    <asp:TextBox ID="txtPersonCardActiveDate" runat="server" CssClass="txtbox" 
                        Width="128px"></asp:TextBox>
                    <asp:CalendarExtender ID="txtPersonCardActiveDate_CalendarExtender" 
                        runat="server" CssClass="cal_Theme1" DaysModeTitleFormat="yyyy,MMMM" 
                        Enabled="False" Format="yyyy-MM-dd" 
                        TargetControlID="txtPersonCardActiveDate" 
                        TodaysDateFormat="yyyy-MMMM-dd" PopupButtonID="txtPersonCardActiveDate">
                    </asp:CalendarExtender>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    户籍</td>
                <td>
                    <asp:TextBox ID="txtPersonRegisterPlace" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
                <td>
                    户籍地址</td>
                <td>
                    <asp:TextBox ID="txtPersonIDCardAddress" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    其他证件名称</td>
                <td>
                    <asp:TextBox ID="txtPersonOtherCardName" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
                <td>
                    其他证件号</td>
                <td>
                    <asp:TextBox ID="txtPersonOtherCardNo" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    工作单位</td>
                <td>
                    <asp:TextBox ID="txtPersonCorpName" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
                <td>
                    职业</td>
                <td>
                    <asp:TextBox ID="txtPersonProfession" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    联系电话</td>
                <td>
                    <asp:TextBox ID="txtClientCurTel" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
                <td>
                    现居住地址</td>
                <td>
                    <asp:TextBox ID="txtClientCurAddr" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    是否户主</td>
                <td>
                    <asp:DropDownList ID="txtPersonIsHouseMaster" runat="server" Height="16px" 
                        Width="135px">
                        <asp:ListItem>是</asp:ListItem>
                        <asp:ListItem>否</asp:ListItem>
                    </asp:DropDownList>
                </td>
                <td>
                    客户编码</td>
                <td>
                    <asp:TextBox ID="txtClientNO" runat="server" CssClass="txtbox"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="style3">
                    客户类型</td>
                <td>
                    <asp:DropDownList ID="txtTreeID" runat="server" 
            DataSourceID="SqlDataSource_ClientTree" DataTextField="TreeName" 
                        DataValueField="TreeID" Height="16px" Width="135px">
        </asp:DropDownList>
                    </td>
                <td>
                    备注说明</td>
                <td>
                    <asp:TextBox ID="txtClientDesp" runat="server" Height="46px" 
                CssClass="txtbox" TextMode="MultiLine"></asp:TextBox>
            <asp:HiddenField ID="HiddenField_ClientID" runat="server" />
                    </td>
            </tr>
        </table>    

    </div>
        </ContentTemplate>
           <Triggers>
               <asp:AsyncPostBackTrigger ControlID="GridView_ClientList" 
                   EventName="SelectedIndexChanged" />
               <asp:AsyncPostBackTrigger ControlID="Button_Save" EventName="Click" />
           </Triggers>
        </asp:UpdatePanel>
    <div style="border: 1px dotted #C0C0C0; position: absolute; top: 334px; height: 300px; width: 600px; left: 200px; overflow: auto;" 
        id="div_Other" >
        <asp:UpdatePanel ID="UpdatePanel_Other" runat="server" UpdateMode="Conditional">
            <ContentTemplate>        
        <asp:TabContainer ID="Tab_Other" runat="server" ActiveTabIndex="1" 
            Height="200px" Width="100%" BorderStyle="None" BorderWidth="0px">
            <asp:TabPanel runat="server" HeaderText="所属房间" ID="TabPanel_House">
                <HeaderTemplate>
                    所属房间
                </HeaderTemplate>
                <ContentTemplate>
                    <asp:Panel ID="Panel_House" runat="server" Height="100%" ScrollBars="Auto" 
                        Width="100%">
                        <asp:GridView ID="GridView_House" runat="server" AutoGenerateColumns="False" 
                            DataSourceID="SqlDataSource_House" EmptyDataText="没有房间信息" Width="860px" 
                            BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
                            CellPadding="3" GridLines="Horizontal">
                            <AlternatingRowStyle BackColor="#F7F7F7" />
                            <Columns>
                                <asp:BoundField DataField="ComeInHouseDate" HeaderText="入住日期" 
                                    SortExpression="ComeInHouseDate" DataFormatString="{0:yyyy-MM-dd}" 
                                    HtmlEncode="False">
                                </asp:BoundField>
                                <asp:BoundField DataField="LeaveHouseDate" HeaderText="退住日期" 
                                    SortExpression="LeaveHouseDate" DataFormatString="{0:yyyy-MM-dd}" 
                                    HtmlEncode="False">
                                </asp:BoundField>
                                <asp:BoundField DataField="AreaNO" HeaderText="小区编码" SortExpression="AreaNO">
                                </asp:BoundField>
                                <asp:BoundField DataField="AreaName" HeaderText="小区名称" 
                                    SortExpression="AreaName">
                                </asp:BoundField>
                                <asp:BoundField DataField="BuildNO" HeaderText="大楼编码" SortExpression="BuildNO">
                                </asp:BoundField>
                                <asp:BoundField DataField="BuildName" HeaderText="大楼名称" 
                                    SortExpression="BuildName">
                                </asp:BoundField>
                                <asp:BoundField DataField="UnitNo" HeaderText="单元编码" SortExpression="UnitNo">
                                </asp:BoundField>
                                <asp:BoundField DataField="UnitName" HeaderText="单元名称" 
                                    SortExpression="UnitName">
                                </asp:BoundField>
                                <asp:BoundField DataField="FloorNO" HeaderText="楼层编码" SortExpression="FloorNO">
                                </asp:BoundField>
                                <asp:BoundField DataField="FloorName" HeaderText="楼层名称" 
                                    SortExpression="FloorName">
                                </asp:BoundField>
                                <asp:BoundField DataField="HouseNO" HeaderText="房间编码" SortExpression="HouseNO">
                                </asp:BoundField>
                                <asp:BoundField DataField="HouseName" HeaderText="房间名称" 
                                    SortExpression="HouseName">
                                </asp:BoundField>
                            </Columns>
                            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                        </asp:GridView>
                    </asp:Panel>
                    <asp:SqlDataSource ID="SqlDataSource_House" runat="server" 
                        ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" SelectCommand="SELECT ClientOfHouse2Client.ComeInHouseDate, ClientOfHouse2Client.LeaveHouseDate, 
	HouseOfArea.AreaNO, HouseOfArea.AreaName, HouseOfBuild.BuildNO, HouseOfBuild.BuildName, 
    HouseOfUnit.UnitName, HouseOfUnit.UnitNo, HouseOfFloor.FloorNO, HouseOfFloor.FloorName, 
    HouseOfHouse.HouseNO, HouseOfHouse.HouseName, ClientOfHouse2Client.ClientID
FROM HouseOfUnit INNER JOIN
      HouseOfArea INNER JOIN
      HouseOfBuild ON HouseOfArea.AreaID = HouseOfBuild.AreaID ON 
      HouseOfUnit.BuildID = HouseOfBuild.BuildID INNER JOIN
      HouseOfHouse INNER JOIN
      HouseOfFloor ON HouseOfHouse.FloorID = HouseOfFloor.FloorID ON 
      HouseOfUnit.UnitID = HouseOfFloor.UnitID INNER JOIN
      ClientOfHouse2Client ON 
      HouseOfHouse.HouseID = ClientOfHouse2Client.HouseID
WHERE (ClientOfHouse2Client.ClientID = @ClientID)">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="GridView_ClientList" Name="ClientID" 
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:SqlDataSource>
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="联系方式">
                <HeaderTemplate>
                    联系方式
                </HeaderTemplate>
                <ContentTemplate>
                    <asp:Panel ID="Panel_Rela" runat="server" BorderStyle="None" Height="100%" 
                        ScrollBars="Auto" Width="100%">
                        <asp:SqlDataSource ID="SqlDataSource_Rela" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" SelectCommand="SELECT [RelaTypeID], [RelaTypeNO], [RelaTypeName], [RelaContect], [ImportExplain], [RelaIsActive], [Postalcode], [IsPrint], [PrintKind], [RelaTypeDesp] FROM [ClientOfClientDetailRelaType] WHERE ([ClientID] = @ClientID)" 
                            InsertCommand="INSERT INTO [ClientOfClientDetailRelaType] ([RelaTypeNO], [RelaTypeName], [RelaContect], [ImportExplain], [RelaIsActive], [Postalcode], [IsPrint], [PrintKind], [RelaTypeDesp],[ClientID]) VALUES (@RelaTypeNO, @RelaTypeName, @RelaContect, @ImportExplain, @RelaIsActive, @Postalcode, @IsPrint, @PrintKind, @RelaTypeDesp,@ClientID)" 
                            ProviderName="<%$ ConnectionStrings:pmsConnectionString.ProviderName %>" 
                            DeleteCommand="DELETE FROM [ClientOfClientDetailRelaType] WHERE [RelaTypeID] = @RelaTypeID" 
                            
                            UpdateCommand="UPDATE [ClientOfClientDetailRelaType] SET [RelaTypeNO] = @RelaTypeNO, [RelaTypeName] = @RelaTypeName, [RelaContect] = @RelaContect, [ImportExplain] = @ImportExplain, [RelaIsActive] = @RelaIsActive, [Postalcode] = @Postalcode, [IsPrint] = @IsPrint, [PrintKind] = @PrintKind, [RelaTypeDesp] = @RelaTypeDesp WHERE [RelaTypeID] = @RelaTypeID">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="GridView_ClientList" Name="ClientID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                            <DeleteParameters>
                                <asp:Parameter Name="RelaTypeID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="RelaTypeNO" Type="String" />
                                <asp:Parameter Name="RelaTypeName" Type="String" />
                                <asp:Parameter Name="RelaContect" Type="String" />
                                <asp:Parameter Name="ImportExplain" Type="String" />
                                <asp:Parameter Name="RelaIsActive" Type="String" />
                                <asp:Parameter Name="Postalcode" Type="String" />
                                <asp:Parameter Name="IsPrint" Type="String" />
                                <asp:Parameter Name="PrintKind" Type="String" />
                                <asp:Parameter Name="RelaTypeDesp" Type="String" />
                                <asp:Parameter Name="RelaTypeID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="RelaTypeNO" Type="String" />
                                <asp:Parameter Name="RelaTypeName" Type="String" />
                                <asp:Parameter Name="RelaContect" Type="String" />
                                <asp:Parameter Name="ImportExplain" Type="String" />
                                <asp:Parameter Name="RelaIsActive" Type="String" />
                                <asp:Parameter Name="Postalcode" Type="String" />
                                <asp:Parameter Name="IsPrint" Type="String" />
                                <asp:Parameter Name="PrintKind" Type="String" />
                                <asp:Parameter Name="RelaTypeDesp" Type="String" />
                                <asp:ControlParameter ControlID="GridView_ClientList" Name="ClientID" 
                                    PropertyName="SelectedValue" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        <asp:GridView ID="GridView_Rela" runat="server" AutoGenerateColumns="False" 
                            BackColor="White" BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px" 
                            CellPadding="3" DataKeyNames="RelaTypeID" 
                            DataSourceID="SqlDataSource_Rela" GridLines="Horizontal" Width="800px" 
                            AllowPaging="True" AllowSorting="True" EmptyDataText="没有信息" 
                            onrowdatabound="GridView_Rela_RowDataBound" 
                            onselectedindexchanged="GridView_Rela_SelectedIndexChanged" 
                            oninit="GridView_Rela_Init" onload="GridView_Rela_Load" 
                            ondatabound="GridView_Rela_DataBound">
                            <AlternatingRowStyle BackColor="#F7F7F7" />
                            <EmptyDataRowStyle BorderStyle="Dotted" />
                            <Columns>
                                <asp:TemplateField ShowHeader="False">
                                    <EditItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                            CommandName="Update" Text="更新"></asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                            CommandName="Cancel" Text="取消"></asp:LinkButton>
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <asp:LinkButton ID="LinkButton3" runat="server" onclick="LinkButton3_Click">保存</asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="LinkButton4" runat="server" onclick="LinkButton4_Click">取消</asp:LinkButton>
                                    </FooterTemplate>
                                    <ItemTemplate>
                                        <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                            CommandName="Edit" Text="编辑"></asp:LinkButton>
                                        &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                            CommandName="Delete" Text="删除"></asp:LinkButton>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="方式编码" SortExpression="RelaTypeNO" 
                                    Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("RelaTypeNO") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("RelaTypeNO") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="联系方式" SortExpression="RelaTypeName">
                                    <EditItemTemplate>
                                        <UserControl:DropDownListBox ID="DropDownListBox1" runat="server" 
                                            SelectedValue='<%# Bind("RelaTypeName") %>' KindFieldName="relatypename">
                                        </UserControl:DropDownListBox>
                                    </EditItemTemplate>
                                    <FooterTemplate>
                                        <UserControl:DropDownListBox ID="DropDownListBox_RelaTypeName" runat="server" 
                                             SelectedValue='<%# Bind("RelaTypeName") %>' KindFieldName="relatypename"> </UserControl:DropDownListBox>
                                    </FooterTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("RelaTypeName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="联系内容" SortExpression="RelaContect">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("RelaContect") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("RelaContect") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="重要说明" SortExpression="ImportExplain" 
                                    Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("ImportExplain") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("ImportExplain") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="是否有效" SortExpression="RelaIsActive" 
                                    Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("RelaIsActive") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("RelaIsActive") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="邮政编码" SortExpression="Postalcode">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox6" runat="server" Text='<%# Bind("Postalcode") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("Postalcode") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="是否打印" SortExpression="IsPrint" Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox7" runat="server" Text='<%# Bind("IsPrint") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("IsPrint") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="打印类别" SortExpression="PrintKind" Visible="False">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox8" runat="server" Text='<%# Bind("PrintKind") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("PrintKind") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="备注说明" SortExpression="RelaTypeDesp">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox9" runat="server" Text='<%# Bind("RelaTypeDesp") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text='<%# Bind("RelaTypeDesp") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />
                            <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />
                            <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />
                            <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />
                            <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />
                        </asp:GridView>
                        &nbsp;
                        <asp:LinkButton ID="LinkButton_relaadd" runat="server" 
                            onclick="LinkButton_relaadd_Click">新增</asp:LinkButton>
                    </asp:Panel>
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel3" runat="server" HeaderText="同住成员">
                <HeaderTemplate>
                    同住成员
                </HeaderTemplate>
                <ContentTemplate>
                    <div style="height: 100%; width: 100%;">
                        
                        <asp:SqlDataSource ID="SqlDataSource_Member" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:pmsConnectionString %>" 
                            
                            SelectCommand="SELECT [MemberNO], [MemberName], [MemberSex], [MemberBirthday], [MemberEduDegree], [MemberCountryPlace], [MemberRegisterPlace], [MemberIDCardNO], [MemberIDCardAddress], [MemberOtherCardName], [MemberOtherCardNO], [MemberIsHouseMaster], [MemberHouseMasterRelation], [MemberProfession], [MemberTel], [MemberCorpName], [MemberPolityProperty], [MemberNation], [MemberDesp] FROM [ClientOfClientDetailMember] WHERE ([ClientID] = @ClientID)" 
                            DeleteCommand="DELETE FROM [ClientOfClientDetailMember] WHERE [MemberID] = @MemberID" 
                            InsertCommand="INSERT INTO [ClientOfClientDetailMember] ([MemberNO], [MemberName], [MemberSex], [MemberBirthday], [MemberEduDegree], [MemberCountryPlace], [MemberRegisterPlace], [MemberIDCardNO], [MemberIDCardAddress], [MemberOtherCardName], [MemberOtherCardNO], [MemberIsHouseMaster], [MemberHouseMasterRelation], [MemberProfession], [MemberTel], [MemberCorpName], [MemberPolityProperty], [MemberNation], [MemberDesp], [ClientID]) VALUES (@MemberNO, @MemberName, @MemberSex, @MemberBirthday, @MemberEduDegree, @MemberCountryPlace, @MemberRegisterPlace, @MemberIDCardNO, @MemberIDCardAddress, @MemberOtherCardName, @MemberOtherCardNO, @MemberIsHouseMaster, @MemberHouseMasterRelation, @MemberProfession, @MemberTel, @MemberCorpName, @MemberPolityProperty, @MemberNation, @MemberDesp, @ClientID)" 
                            UpdateCommand="UPDATE [ClientOfClientDetailMember] SET [MemberNO] = @MemberNO, [MemberName] = @MemberName, [MemberSex] = @MemberSex, [MemberBirthday] = @MemberBirthday, [MemberEduDegree] = @MemberEduDegree, [MemberCountryPlace] = @MemberCountryPlace, [MemberRegisterPlace] = @MemberRegisterPlace, [MemberIDCardNO] = @MemberIDCardNO, [MemberIDCardAddress] = @MemberIDCardAddress, [MemberOtherCardName] = @MemberOtherCardName, [MemberOtherCardNO] = @MemberOtherCardNO, [MemberIsHouseMaster] = @MemberIsHouseMaster, [MemberHouseMasterRelation] = @MemberHouseMasterRelation, [MemberProfession] = @MemberProfession, [MemberTel] = @MemberTel, [MemberCorpName] = @MemberCorpName, [MemberPolityProperty] = @MemberPolityProperty, [MemberNation] = @MemberNation, [MemberDesp] = @MemberDesp WHERE [MemberID] = @MemberID">
                            <SelectParameters>
                                <asp:ControlParameter ControlID="GridView_ClientList" Name="ClientID" 
                                    PropertyName="SelectedValue" Type="Int32" />
                            </SelectParameters>
                            <DeleteParameters>
                                <asp:Parameter Name="MemberID" Type="Int32" />
                            </DeleteParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="MemberNO" Type="String" />
                                <asp:Parameter Name="MemberName" Type="String" />
                                <asp:Parameter Name="MemberSex" Type="String" />
                                <asp:Parameter Name="MemberBirthday" Type="DateTime" />
                                <asp:Parameter Name="MemberEduDegree" Type="String" />
                                <asp:Parameter Name="MemberCountryPlace" Type="String" />
                                <asp:Parameter Name="MemberRegisterPlace" Type="String" />
                                <asp:Parameter Name="MemberIDCardNO" Type="String" />
                                <asp:Parameter Name="MemberIDCardAddress" Type="String" />
                                <asp:Parameter Name="MemberOtherCardName" Type="String" />
                                <asp:Parameter Name="MemberOtherCardNO" Type="String" />
                                <asp:Parameter Name="MemberIsHouseMaster" Type="String" />
                                <asp:Parameter Name="MemberHouseMasterRelation" Type="String" />
                                <asp:Parameter Name="MemberProfession" Type="String" />
                                <asp:Parameter Name="MemberTel" Type="String" />
                                <asp:Parameter Name="MemberCorpName" Type="String" />
                                <asp:Parameter Name="MemberPolityProperty" Type="String" />
                                <asp:Parameter Name="MemberNation" Type="String" />
                                <asp:Parameter Name="MemberDesp" Type="String" />
                                <asp:Parameter Name="MemberID" Type="Int32" />
                            </UpdateParameters>
                            <InsertParameters>
                                <asp:Parameter Name="MemberNO" Type="String" />
                                <asp:Parameter Name="MemberName" Type="String" />
                                <asp:Parameter Name="MemberSex" Type="String" />
                                <asp:Parameter Name="MemberBirthday" Type="DateTime" />
                                <asp:Parameter Name="MemberEduDegree" Type="String" />
                                <asp:Parameter Name="MemberCountryPlace" Type="String" />
                                <asp:Parameter Name="MemberRegisterPlace" Type="String" />
                                <asp:Parameter Name="MemberIDCardNO" Type="String" />
                                <asp:Parameter Name="MemberIDCardAddress" Type="String" />
                                <asp:Parameter Name="MemberOtherCardName" Type="String" />
                                <asp:Parameter Name="MemberOtherCardNO" Type="String" />
                                <asp:Parameter Name="MemberIsHouseMaster" Type="String" />
                                <asp:Parameter Name="MemberHouseMasterRelation" Type="String" />
                                <asp:Parameter Name="MemberProfession" Type="String" />
                                <asp:Parameter Name="MemberTel" Type="String" />
                                <asp:Parameter Name="MemberCorpName" Type="String" />
                                <asp:Parameter Name="MemberPolityProperty" Type="String" />
                                <asp:Parameter Name="MemberNation" Type="String" />
                                <asp:Parameter Name="MemberDesp" Type="String" />
                                <asp:ControlParameter ControlID="HiddenField_ClientID" Name="ClientID" 
                                    PropertyName="Value" Type="Int32" />
                            </InsertParameters>
                        </asp:SqlDataSource>
                        <asp:ListView ID="ListView3" runat="server" 
                            DataSourceID="SqlDataSource_Member" InsertItemPosition="LastItem">
                            <ItemTemplate>
                                <tr style="background-color:#DCDCDC;color: #000000;">
                                    <td>
                                        <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                                    </td>
                                    <td>
                                        <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNOLabel" runat="server" Text='<%# Eval("MemberNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNameLabel" runat="server" 
                                            Text='<%# Eval("MemberName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberSexLabel" runat="server" Text='<%# Eval("MemberSex") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberBirthdayLabel" runat="server" 
                                            Text='<%# Eval("MemberBirthday") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberEduDegreeLabel" runat="server" 
                                            Text='<%# Eval("MemberEduDegree") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCountryPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberCountryPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberRegisterPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberRegisterPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardAddressLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardAddress") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNameLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIsHouseMasterLabel" runat="server" 
                                            Text='<%# Eval("MemberIsHouseMaster") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberHouseMasterRelationLabel" runat="server" 
                                            Text='<%# Eval("MemberHouseMasterRelation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberProfessionLabel" runat="server" 
                                            Text='<%# Eval("MemberProfession") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberTelLabel" runat="server" Text='<%# Eval("MemberTel") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCorpNameLabel" runat="server" 
                                            Text='<%# Eval("MemberCorpName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberPolityPropertyLabel" runat="server" 
                                            Text='<%# Eval("MemberPolityProperty") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNationLabel" runat="server" 
                                            Text='<%# Eval("MemberNation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberDespLabel" runat="server" 
                                            Text='<%# Eval("MemberDesp") %>' />
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <AlternatingItemTemplate>
                                <tr style="background-color:#FFF8DC;">
                                    <td>
                                        <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                                    </td>
                                    <td>
                                        <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNOLabel" runat="server" Text='<%# Eval("MemberNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNameLabel" runat="server" 
                                            Text='<%# Eval("MemberName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberSexLabel" runat="server" Text='<%# Eval("MemberSex") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberBirthdayLabel" runat="server" 
                                            Text='<%# Eval("MemberBirthday") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberEduDegreeLabel" runat="server" 
                                            Text='<%# Eval("MemberEduDegree") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCountryPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberCountryPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberRegisterPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberRegisterPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardAddressLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardAddress") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNameLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIsHouseMasterLabel" runat="server" 
                                            Text='<%# Eval("MemberIsHouseMaster") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberHouseMasterRelationLabel" runat="server" 
                                            Text='<%# Eval("MemberHouseMasterRelation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberProfessionLabel" runat="server" 
                                            Text='<%# Eval("MemberProfession") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberTelLabel" runat="server" Text='<%# Eval("MemberTel") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCorpNameLabel" runat="server" 
                                            Text='<%# Eval("MemberCorpName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberPolityPropertyLabel" runat="server" 
                                            Text='<%# Eval("MemberPolityProperty") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNationLabel" runat="server" 
                                            Text='<%# Eval("MemberNation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberDespLabel" runat="server" 
                                            Text='<%# Eval("MemberDesp") %>' />
                                    </td>
                                </tr>
                            </AlternatingItemTemplate>
                            <EmptyDataTemplate>
                                <table runat="server" 
                                    style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;">
                                    <tr>
                                        <td>
                                            未返回数据。</td>
                                    </tr>
                                </table>
                            </EmptyDataTemplate>
                            <InsertItemTemplate>
                                <tr style="">
                                    <td>
                                        <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" />
                                    </td>
                                    <td>
                                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberSexTextBox" runat="server" 
                                            Text='<%# Bind("MemberSex") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberBirthdayTextBox" runat="server" 
                                            Text='<%# Bind("MemberBirthday") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberEduDegreeTextBox" runat="server" 
                                            Text='<%# Bind("MemberEduDegree") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberCountryPlaceTextBox" runat="server" 
                                            Text='<%# Bind("MemberCountryPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberRegisterPlaceTextBox" runat="server" 
                                            Text='<%# Bind("MemberRegisterPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIDCardNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberIDCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIDCardAddressTextBox" runat="server" 
                                            Text='<%# Bind("MemberIDCardAddress") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberOtherCardNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberOtherCardName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberOtherCardNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberOtherCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIsHouseMasterTextBox" runat="server" 
                                            Text='<%# Bind("MemberIsHouseMaster") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberHouseMasterRelationTextBox" runat="server" 
                                            Text='<%# Bind("MemberHouseMasterRelation") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberProfessionTextBox" runat="server" 
                                            Text='<%# Bind("MemberProfession") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberTelTextBox" runat="server" 
                                            Text='<%# Bind("MemberTel") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberCorpNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberCorpName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberPolityPropertyTextBox" runat="server" 
                                            Text='<%# Bind("MemberPolityProperty") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNationTextBox" runat="server" 
                                            Text='<%# Bind("MemberNation") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberDespTextBox" runat="server" 
                                            Text='<%# Bind("MemberDesp") %>' />
                                    </td>
                                </tr>
                            </InsertItemTemplate>
                            <LayoutTemplate>
                                <table runat="server">
                                    <tr runat="server">
                                        <td runat="server">
                                            <table ID="itemPlaceholderContainer" runat="server" border="1" 
                                                style="background-color: #FFFFFF;border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px;font-family: Verdana, Arial, Helvetica, sans-serif;">
                                                <tr runat="server" style="background-color:#DCDCDC;color: #000000;">
                                                    <th runat="server">
                                                    </th>
                                                    <th runat="server">
                                                    </th>
                                                    <th runat="server">
                                                        MemberNO</th>
                                                    <th runat="server">
                                                        MemberName</th>
                                                    <th runat="server">
                                                        MemberSex</th>
                                                    <th runat="server">
                                                        MemberBirthday</th>
                                                    <th runat="server">
                                                        MemberEduDegree</th>
                                                    <th runat="server">
                                                        MemberCountryPlace</th>
                                                    <th runat="server">
                                                        MemberRegisterPlace</th>
                                                    <th runat="server">
                                                        MemberIDCardNO</th>
                                                    <th runat="server">
                                                        MemberIDCardAddress</th>
                                                    <th runat="server">
                                                        MemberOtherCardName</th>
                                                    <th runat="server">
                                                        MemberOtherCardNO</th>
                                                    <th runat="server">
                                                        MemberIsHouseMaster</th>
                                                    <th runat="server">
                                                        MemberHouseMasterRelation</th>
                                                    <th runat="server">
                                                        MemberProfession</th>
                                                    <th runat="server">
                                                        MemberTel</th>
                                                    <th runat="server">
                                                        MemberCorpName</th>
                                                    <th runat="server">
                                                        MemberPolityProperty</th>
                                                    <th runat="server">
                                                        MemberNation</th>
                                                    <th runat="server">
                                                        MemberDesp</th>
                                                </tr>
                                                <tr ID="itemPlaceholder" runat="server">
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr runat="server">
                                        <td runat="server" 
                                            style="text-align: center;background-color: #CCCCCC;font-family: Verdana, Arial, Helvetica, sans-serif;color: #000000;">
                                        </td>
                                    </tr>
                                </table>
                            </LayoutTemplate>
                            <EditItemTemplate>
                                <tr style="background-color:#008A8C;color: #FFFFFF;">
                                    <td>
                                        <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                                    </td>
                                    <td>
                                        <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberSexTextBox" runat="server" 
                                            Text='<%# Bind("MemberSex") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberBirthdayTextBox" runat="server" 
                                            Text='<%# Bind("MemberBirthday") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberEduDegreeTextBox" runat="server" 
                                            Text='<%# Bind("MemberEduDegree") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberCountryPlaceTextBox" runat="server" 
                                            Text='<%# Bind("MemberCountryPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberRegisterPlaceTextBox" runat="server" 
                                            Text='<%# Bind("MemberRegisterPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIDCardNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberIDCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIDCardAddressTextBox" runat="server" 
                                            Text='<%# Bind("MemberIDCardAddress") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberOtherCardNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberOtherCardName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberOtherCardNOTextBox" runat="server" 
                                            Text='<%# Bind("MemberOtherCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberIsHouseMasterTextBox" runat="server" 
                                            Text='<%# Bind("MemberIsHouseMaster") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberHouseMasterRelationTextBox" runat="server" 
                                            Text='<%# Bind("MemberHouseMasterRelation") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberProfessionTextBox" runat="server" 
                                            Text='<%# Bind("MemberProfession") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberTelTextBox" runat="server" 
                                            Text='<%# Bind("MemberTel") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberCorpNameTextBox" runat="server" 
                                            Text='<%# Bind("MemberCorpName") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberPolityPropertyTextBox" runat="server" 
                                            Text='<%# Bind("MemberPolityProperty") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberNationTextBox" runat="server" 
                                            Text='<%# Bind("MemberNation") %>' />
                                    </td>
                                    <td>
                                        <asp:TextBox ID="MemberDespTextBox" runat="server" 
                                            Text='<%# Bind("MemberDesp") %>' />
                                    </td>
                                </tr>
                            </EditItemTemplate>
                            <SelectedItemTemplate>
                                <tr style="background-color:#008A8C;font-weight: bold;color: #FFFFFF;">
                                    <td>
                                        <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                                    </td>
                                    <td>
                                        <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNOLabel" runat="server" Text='<%# Eval("MemberNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNameLabel" runat="server" 
                                            Text='<%# Eval("MemberName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberSexLabel" runat="server" Text='<%# Eval("MemberSex") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberBirthdayLabel" runat="server" 
                                            Text='<%# Eval("MemberBirthday") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberEduDegreeLabel" runat="server" 
                                            Text='<%# Eval("MemberEduDegree") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCountryPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberCountryPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberRegisterPlaceLabel" runat="server" 
                                            Text='<%# Eval("MemberRegisterPlace") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIDCardAddressLabel" runat="server" 
                                            Text='<%# Eval("MemberIDCardAddress") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNameLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberOtherCardNOLabel" runat="server" 
                                            Text='<%# Eval("MemberOtherCardNO") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberIsHouseMasterLabel" runat="server" 
                                            Text='<%# Eval("MemberIsHouseMaster") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberHouseMasterRelationLabel" runat="server" 
                                            Text='<%# Eval("MemberHouseMasterRelation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberProfessionLabel" runat="server" 
                                            Text='<%# Eval("MemberProfession") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberTelLabel" runat="server" Text='<%# Eval("MemberTel") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberCorpNameLabel" runat="server" 
                                            Text='<%# Eval("MemberCorpName") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberPolityPropertyLabel" runat="server" 
                                            Text='<%# Eval("MemberPolityProperty") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberNationLabel" runat="server" 
                                            Text='<%# Eval("MemberNation") %>' />
                                    </td>
                                    <td>
                                        <asp:Label ID="MemberDespLabel" runat="server" 
                                            Text='<%# Eval("MemberDesp") %>' />
                                    </td>
                                </tr>
                            </SelectedItemTemplate>
                        </asp:ListView>
                        
                    </div>
                </ContentTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel4" runat="server" HeaderText="租售来访">
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel5" runat="server" HeaderText="看房记录">
                <HeaderTemplate>
                    看房记录
                </HeaderTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel6" runat="server" HeaderText="投诉记录">
                <HeaderTemplate>
                    投诉记录
                </HeaderTemplate>
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel7" runat="server" HeaderText="回访记录">
            </asp:TabPanel>
            <asp:TabPanel ID="TabPanel8" runat="server" HeaderText="客户事件">
            </asp:TabPanel>
        </asp:TabContainer>
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="GridView_ClientList" 
                    EventName="SelectedIndexChanged" />
            </Triggers>
        </asp:UpdatePanel>
        
        </div>
    <div id="div_CMD" 
        
        style="position: absolute; top: 0px; left: 0px; height: 28px; width: 800px">
        <asp:UpdatePanel ID="UpdatePanel_CMD" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <table border="0" class="style1" cellpadding="0" cellspacing="0">
                    <tr>
                        <td style="width: 60px">
                            <asp:Button ID="Button_Add" runat="server" Height="26px" 
                                onclick="Button_Add_Click" Text="新增" Width="80px" 
                                CssClass="btn3_mouseout" />
                        </td>
                        <td style="width: 60px">
                            &nbsp;</td>
                        <td style="width: 60px">
                            <asp:Button ID="Button_Save" runat="server" CssClass="btn3_mouseout" 
                                Height="26px" onclick="Button_Save_Click" Text="保存" Width="80px" />
                        </td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
